﻿<?php require_once('../wp-blog-header.php'); ?>
<?php get_header(); ?>
<?php
require_once('conn.php');
// $username = $_SESSION['username'];
// $isLoginOK = $_SESSION['loginOK'];
// if(isset($_SESSION['loginOK']) && $_SESSION['loginOK'])
// {
	
	$id_buyRecord=$_POST['id_buyRecord'];
	$mobileNO=$_POST['mobileNO'];
	$score=$_POST['score'];
	$revisitDate=date("Y-m-d"); 
	$feedback=$_POST['feedback'];
	$optID=$_POST['optID'];	
	
	$exec="INSERT INTO revisitRecord(id_buyRecord, mobileNO, score, revisitDate, feedback, optID) values('$id_buyRecord', '$mobileNO', '$score', '$revisitDate', '$feedback', '$optID')";
	if($result=mysql_query($exec))
	{
		echo '<script language="JavaScript">window.alert("提交成功");</script>'; 
		echo '<script language="JavaScript">window.location.href="revisitAllCustomer.php";</script>'; 
	}
	else
	{
		echo '<script language="JavaScript">window.alert("提交失败，请重新登录");</script>'; 
		echo '<script language="JavaScript">window.location.href="index.php";</script>'; 
	}		
	
// }
// else
// {
	// // 验证失败，将 $_session["loginOK"] 置为 false 　　
	// $_SESSION['loginOK'] = false;
	// die("您无权访问"); 
// }
?>
<?php get_footer(); ?>